import 'package:flutter/material.dart';
import 'package:boss/models/material.dart' as material;

class MaterialDetailProvider extends ChangeNotifier {
  material.Material data;

  MaterialDetailProvider({material.Material data}) {
    if (data == null) {
      this.data = material.Material.fromJson({});
    } else {
      this.data = data;
    }
  }

  //详情页具体行为是否为编辑
  bool get isEditForDetailPage {
    return data.id != null;
  }
}